class Solution(object):
    def countPoints(self, points, queries):
        m = len(queries)
        ans = [0] * m
        for index, (x, y, r) in enumerate(queries):
            c = 0
            for X, Y in points:
                if (X - x) ** 2 + (Y - y) ** 2 <= r ** 2:
                    c += 1
            ans[index] = c
        return ans